Skip to content

fix(release): 公证失败时打印 Apple 的诊断 - #363

Merged
wangzhizhou merged 3 commits into
mainfrom
dev
Nov 23, 2026
Merged

wangzhizhou merged 3 commits into
mainfrom
dev

Conversation

@wangzhizhou

Copy link
Copy Markdown
Contributor

v1.4.2 的公证返回 Invalid(submission 075d8985-…),但日志里只看得到 stapler: Error 65,没法判断原因。

  • ci-sign.sh 新增 notarize():解析 notarytool submit --output-format json 的 id/status,非 Accepted 时自动拉 notarytool log <id> 打到 stderr;
  • 顺带修掉 JSON 解析(notarytool 输出是 "status" : "Accepted",带空格);
  • 测试桩改成和真工具一样返回 Accepted / Invalid+log / 硬失败三种,并断言 Invalid 时会打印 Apple 的条目。

这条不改变发布产物,只是让下一次失败可诊断。

The v1.4.2 notarization came back Invalid and the only visible symptom was
stapler failing with error 65, so there was no way to tell why. Parse the
submit result, and on rejection fetch `notarytool log` for that id and
print it. Also match the pretty-printed JSON notarytool actually emits
(spaces around the colon), which the first version did not.

The mock xcrun now answers like the real one: Accepted, Invalid (with a log
document), or a hard error.

Signed-off-by: wangzhizhou <[email protected]>
ci-sign.sh now submits through notarize(); the contract test still looked
for the raw notarytool invocation.

Signed-off-by: wangzhizhou <[email protected]>
@wangzhizhou
wangzhizhou merged commit 953e1e3 into main Nov 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant